package com.study.www.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.MongoTransactionManager;

/**
 * 单节点的mongodb 不支持事务
 * @author : Administrator.zhuyanpeng
 * @date : 2019/10/31 - 17:07
 */
@Configuration
public class MongoConfiguration{

    @Bean
    MongoTransactionManager transactionManager(MongoDbFactory mongoDbFactory){
        return new MongoTransactionManager(mongoDbFactory);
    }


}
